package com.ganee.agora.viewmodel

import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.ganee.agora.model.InsertActivityEntity
import com.ganee.agora.repository.*
import com.ganee.baselib.httprequest.callback.RequestCallback

import com.ganee.baselib.mvvmlibrary.base.BaseRepository
import com.ganee.baselib.mvvmlibrary.base.BaseViewModel
import okhttp3.RequestBody

class ScanQrCodeViewModel(application: Application) : BaseViewModel<ScanQrCodeRepository>(application) {

    var data = MutableLiveData<Any>()

    override fun getRepository(): ScanQrCodeRepository {
        return ScanQrCodeRepository(this)
    }


    //核验订单信息
    fun verifyTicketInfo(body: RequestBody) {
        mRepository.verifyTicketInfo(body, RequestCallback<Any> { it ->
            data.value = it
        })
    }

}
